package fun.eliauk.treedemo.utils.encrypt;

import cn.hutool.core.codec.Base64;
import cn.hutool.crypto.digest.DigestUtil;
import cn.hutool.crypto.digest.MD5;

import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;

public class Md5EncryptService implements EncryptService{
    @Override
    public String encrypt(String content) {
        return null;
    }

    @Override
    public String decrypt(String content) {
        return null;
    }
    public static void main(String[] args) {
        String salt = "1234";
        int saltIndex =1;
        int times     =2;

        String str = "青青子衿";
        MD5 md5 =  new MD5(salt.getBytes(StandardCharsets.UTF_8),saltIndex,times);
        String s = md5.digestHex(str);

        MessageDigest digest = md5.getDigest();
        System.out.println(s);
    }
}


